package com.zuthub.system.service.impl;

import java.util.List;
import com.zuthub.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.zuthub.system.mapper.SysProfessorMapper;
import com.zuthub.system.domain.SysProfessor;
import com.zuthub.system.service.ISysProfessorService;

/**
 * 专家管理Service业务层处理
 * 
 * @author zuthub
 * @date 2021-04-02
 */
@Service
public class SysProfessorServiceImpl implements ISysProfessorService 
{
    @Autowired
    private SysProfessorMapper sysProfessorMapper;

    /**
     * 查询专家管理
     * 
     * @param professorId 专家管理ID
     * @return 专家管理
     */
    @Override
    public SysProfessor selectSysProfessorById(Long professorId)
    {
        return sysProfessorMapper.selectSysProfessorById(professorId);
    }

    /**
     * 查询专家管理列表
     * 
     * @param sysProfessor 专家管理
     * @return 专家管理
     */
    @Override
    public List<SysProfessor> selectSysProfessorList(SysProfessor sysProfessor)
    {
        return sysProfessorMapper.selectSysProfessorList(sysProfessor);
    }

    /**
     * 新增专家管理
     * 
     * @param sysProfessor 专家管理
     * @return 结果
     */
    @Override
    public int insertSysProfessor(SysProfessor sysProfessor)
    {
        sysProfessor.setCreateTime(DateUtils.getNowDate());
        return sysProfessorMapper.insertSysProfessor(sysProfessor);
    }

    /**
     * 修改专家管理
     * 
     * @param sysProfessor 专家管理
     * @return 结果
     */
    @Override
    public int updateSysProfessor(SysProfessor sysProfessor)
    {
        sysProfessor.setUpdateTime(DateUtils.getNowDate());
        return sysProfessorMapper.updateSysProfessor(sysProfessor);
    }

    /**
     * 批量删除专家管理
     * 
     * @param professorIds 需要删除的专家管理ID
     * @return 结果
     */
    @Override
    public int deleteSysProfessorByIds(Long[] professorIds)
    {
        return sysProfessorMapper.deleteSysProfessorByIds(professorIds);
    }

    /**
     * 删除专家管理信息
     * 
     * @param professorId 专家管理ID
     * @return 结果
     */
    @Override
    public int deleteSysProfessorById(Long professorId)
    {
        return sysProfessorMapper.deleteSysProfessorById(professorId);
    }
}
